<base href="<?php echo base_url();?>" />
<?php
#$this->load->helper(array('form'));
#echo validation_errors(); 
#echo form_open('kurseteilnehmer_controller/set_kurseteilnehmer');
#echo "<input type='input' name='kursecode' hidden='true' value='".$kursecode."'/>";
echo "<table>
		<thead>
	    	<tr>
		      	<th class='sorter-false'>Teilnehmer. </th>
		      	<th class='sorter-false'>User ID </th>
	    	</tr>
		</thead>
		<tbody>";
			$a = 1;
			foreach($kurseteilnehmer as $row):
	  echo "<tr>
				<td>".$a." </td>
				<td>";
				echo "<input type='input' name='userid[".$a."]' value='".$row['UserID']."' disabled/><br />";				
		   echo"</td>
			</tr>";
			$a++;
			endforeach;		
			for($i = $a; $i <= $Anzahl; $i++):
	  echo "<tr>
				<td>".$i." </td>
				<td>";
				echo "<input type='input' name='userid[".$i."]' disabled/><br />";				
		   echo"</td>
			</tr>";
			endfor; 
 echo "</tbody>
	</table>";

#echo "<input type='submit' name='submit' value='Teilnehmer Speichern' > <br /> <br />
#	 </form>";
?>
<script>
$(document).ready(function() 
    { 
        $("table").tablesorter({ 
        theme: 'green',
        widthFixed: false, 
        widgets: ['zebra'] 
    })
    } 
); 
</script>
